<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <ui:composition template="/templates/default.xhtml">
            <ui:define name="content">
                <h:form>
                    <h:selectOneMenu  value="#{allCourses.studyprograms}">
                        <f:selectItem itemLabel="#{locale.selectStudyprogram}" itemValue=""/>
                        <f:selectItems value="#{allCourses.studyprograms}" var="s" itemLabel="#{s.name}" itemValue="#{allCourses.studprog}"/>
                    </h:selectOneMenu>

                    <h:selectOneMenu value="#{allCourses.institutes}">
                        <f:selectItem itemLabel="#{locale.selectInstitutes}" itemValue=""/>
                        <f:selectItems value="#{allCourses.inst}" var="i" itemLabel="#{i.name}" itemValue="#{allCourses.inst}"/>
                    </h:selectOneMenu>

                    <h:selectOneMenu value="#{allCourses.departments}">
                        <f:selectItem itemLabel="#{locale.selectDepartment}" itemValue=""/>
                        <f:selectItems value="#{allCourses.dep}" var="d" itemLabel="#{d.name}" itemValue="#{allCourses.dep}"/>
                    </h:selectOneMenu>

                    <h:commandButton value="Vis" action="#{allCourses.courses}" />
                </h:form>
                
                             
                <h:dataTable value="#{allCourses.courses}" var="c" >
                    <h:column>
                        <f:facet name="header">
                            #{locale.dtHeaderCourseID}
                        </f:facet>
                        <h:outputText value="#{c.courseID}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            #{locale.dtHeaderCourseCode}
                        </f:facet>
                        <h:outputText value="#{c.courseCode}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            #{locale.dtHeaderCourseName}
                        </f:facet>
                        <h:outputText value="#{c.courseName}" />
                    </h:column>
                </h:dataTable>
            </ui:define>
        </ui:composition>
    </h:body>
</html>

